home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group94b.txt
/
000003_icon-group-sender _Fri Aug 19 13:35:02 1994.msg
< prev
next >
Wrap
Internet Message Format
|
1995-02-09
|
3KB
Received: by cheltenham.cs.arizona.edu; Fri, 19 Aug 1994 07:25:58 MST
To: icon-group-l@cs.arizona.edu
Date: Fri, 19 Aug 1994 13:35:02 GMT
From: mcarroll@watson.ibm.com (Mark Chu-Carroll)
Message-Id: <MCARROLL.94Aug19093502@shamrock.watson.ibm.com>
Organization: IBM T.J. Watson Research
Sender: icon-group-request@cs.arizona.edu
References: <330a3u$3vq@shum.cc.huji.ac.il>
Subject: Re: Simple syntax? A definition?
Errors-To: icon-group-errors@cs.arizona.edu
>>>>> "Zvi" == Zvi Lamm <mslamm@pluto.cc.huji.ac.il> writes:
In article <330a3u$3vq@shum.cc.huji.ac.il> mslamm@pluto.cc.huji.ac.il (Zvi Lamm) writes:
Zvi> Following the recent thread on perl vs. Icon, and posts about
Zvi> UNIX *tools* I started thinking on how one can define what are
Zvi> the good qualities a synatx should have. It appears to me that
Zvi> what counts is simplicity. A simple syntax would be one that can
Zvi> easaly be built (NOT parsed) by programs (so that the language
Zvi> can be used as a tool interface). It would also be easy for
Zvi> humans (that's us!) to learn and use.
Zvi> Does anyone have suggestions on how to define this in a more
Zvi> mathematical or precise way? I thought about YACC
Zvi> clauses/sentence. But I am not sure it's enough because the YACC
Zvi> approach narrows you down to LALR.
Zvi> I thought one criterion can be PROXIMITY - that is that
Zvi> semantically related elements should be near each other. Any
Zvi> others?
I've been thinking about this somewhat lately, because my dissertation
work involves adding parallel programming constructs to sequential
languages, and I want to do so in a *clear* way.
The things that I've come up with so far are:
<1> Unambiguous - for a human reader, it helps a *lot* if there's only one
correct reading of an element.
<2> Orthogonal - different constructs should look different. (closely
related to <1>. If I look at a construct, I should be able to tell what
it does with minimal knowledge about context. if x = a is an assignment
statement, then x=a shouldn't also be a comparison in a different context.)
<3> Minimal - the less "noise" there is in the syntax the better. (ie,
COBOL is *bad*, because it's very hard to isolate the meaningful
text from all of the excess garbage.)
<4> Proximity - I agree with you, it's very important that related elements
be near each other.
<5> Seperation - clauses should be visibly seperated. (This applies to
things like the different branches of an if statement. Lisp style
if's can be bad, because it's hard to see where the "then"
part ends and the "else" part begins.
<6> Legible - using a large number of bizzare symbols makes a program
much harder to read. (Look at a one-liner in APL, compared to a
program in J with the primitives aliased to english words. Both
can provide a beautiful, elegant solution to a problem. But almost
anyone can read the J program given a 5 minute introduction to the
language, and the APL program can take an expert time to decode.)
<MC>